<html ng-app="sales">
<head>
    <meta charset="UTF-8">
    <title>华成销售管理系统 -- {{title}}</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="icon" type="image/x-icon" href="/favicon.ico">
    <link rel="stylesheet" type="text/css" href="/css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="/css/font-awesome.min.css">
    <link rel="stylesheet" type="text/css"
          href="/css/bootstrap-datetimepicker.min.css">
    <link rel="stylesheet" type="text/css" href="/css/common.css">
    <link rel="stylesheet" type="text/css" href="/css/page.css">
    <link rel="stylesheet" type="text/css" href="/css/picker.css">
    <link rel="stylesheet" type="text/css" href="/css/sorter.css">
</head>
<body>

<div ng-controller="ctrl" class="container">
    <div class="col-xs-12 dropdown">
        <div class="nav-menu">
            <input type="text" data-toggle="dropdown">

            <div class="dropdown-menu" aria-labelledby="dropdownMenu">
                testcontent
            </div>
        </div>
    </div>
    <br/><br/><br/>

    <div class="row">

        <div class="col-xs-12">
            用户 {{user_id}}
            <user-picker user="user_id"></user-picker>
        </div>
        <br/><br/><br/>

        <div class="col-xs-12">
            门店 {{shop}}
            <shop-picker shop="shop"></shop-picker>
        </div>
        <br/><br/><br/>

        <div class="col-xs-12">
            销售 {{salesman}}
            <salesman-picker class="col-md-5"
                             ng-model="salesman"></salesman-picker>
        </div>
        <br/><br/><br/>

        <div class="col-xs-12">
            {{vm}}
            <vm-picker vehicle-model="vm"></vm-picker>
        </div>
        <br/><br/><br/>

        <div class="col-xs-12">
            <vm-selector vehicle-model="vm"
                    ></vm-selector>

        </div>


        <p>
           <input ng-model="time">
            <datetime-picker ng-model="time" today-btn="true" format="yyyy-mm-dd hh:ii:ss"></datetime-picker>
        </p>
        <p>
            {{aTime}}
            <datetime-picker ng-model="aTime" start-date="time"></datetime-picker>
        </p>

        <p>
            <sorter sort="sort" cols="mock_cols"></sorter>
            {{sort}}
        </p>

        <input id="myCar" list="cars" ng-model="myCar"/>{{myCar}}
        <datalist id="cars">
            <option value="BMW"></option>
            <option value="中文"></option>
            <option value="Bwe"></option>
            <option value="Bss"></option>
            <option value="BMss" label="宝马">xxxx</option>
            <option value="BMss"></option>
            <option value="BMss"></option>
            <option value="BMss"></option>
            <option value="123"></option>
            <option value="wee"></option>
            <option value="BMx"></option>
            <option value="Ford"></option>
            <option value="Volvo"></option>
        </datalist>

        <p>
            <vm-input ng-model="vm" msrp="true" cost="true"></vm-input>
        </p>

    </div>

    <!-- <div class="row">
        <div class="col-xs-12">
            <div class="picker-content">
                <div class="picker-input">
                    <input type="text" value="2333hlkjj|大众|POLO 2007|140000|" readonly="true">
                </div>
                <div class="picker-menu">
                    <div class="picker-search">
                        <input type="text" class="clear-input" placeholder="Search">
                        <span class="glyphicon glyphicon-search picker-icon"></span>
                    </div>
                    <div class="picker-item">
                        <span>2333hlkjj</span>
                        <span>|</span>
                        <span>大众</span>
                        <span>|</span>
                        <span>POLO 2007</span>
                        <span>|</span>
                        <span>140000</span>
                    </div>
                    <div class="picker-item">
                        <span>xdscwdewdwedwe</span>
                        <span>|</span>
                        <span>大w众</span>
                        <span>|</span>
                        <span>POwLO 2007</span>
                        <span>|</span>
                        <span>14wdfe0000</span>
                    </div>
                </div>
            </div>
        </div>
    </div> -->
    <!-- 添加来访记录 -->
    <form-sales-vol ng-model = 'salesVol'></form-sales-vol>


    <form-reception ng-model = "reception"></form-reception>

</div>
<script src="/js/jquery-2.1.3.min.js"></script>
<script src="/js/bootstrap.min.js"></script>
<script src="/js/angular.min.js"></script>
<script src="/js/angular-route.min.js"></script>
<script src="/js/base/ui-bootstrap-tpls.js"></script>
<script src="/js/bootstrap-datetimepicker.js"></script>

<script src="../app.js"></script>
<script>
    var app = angular.module('sales', [])
            .controller('ctrl', function ($scope) {
                $scope.vm = {
                    brand: '雪佛兰',
                    model: '赛欧3'
                };
                $scope.time = {};
                $scope.aTime = {};
                $scope.user_id = {};
                $scope.salesman = {};

                $scope.sort = [];

                $scope.mock_cols = [{id: 'name', name: '名字'}, {
                    id  : 'sn',
                    name: '编号'
                }];

                $scope.salesVol = {};

                $scope.reception = {};

            });

    app.directive('userPicker', require('angular-userpicker'))
            .directive('shopPicker', require('angular-shoppicker'))
            .directive('datetimePicker', require('angular-datetimepicker'))
            .directive('salesmanPicker', require('angular-salesmanpicker'))
            .directive('vmPicker', require('angular-vehiclemodelpicker'))
            .directive('vmSelector', require('angular-vehiclemodelcascadeselector'))
            .directive('sorter', require('angular-sorter'))
            .directive('vmInput', require('angular-vehiclemodelinput'))
            // .directive('formSalesVol', require('form-sales-vol'))
            .directive('formReception', require('form-reception'));
</script>
</body>
</html>